<extend name="public@emptypage" />
<block name="content">
<div class="card">
<div class="card-header card-header-primary">

    <ul class="nav nav-tabs" data-tabs="tabs">
        <li class="nav-item">
          <a class="nav-link"  href="{:url('mailer/index')}">{:lang('ADMIN_MAILER_INDEX')}</a>
      </li>
        <li class="nav-item">
          <a class="nav-link active"  href="{:url('mailer/template')}?template_key=verification_code">数字验证码邮件模板</a>
      </li>
    </ul>
</div>

    <div class="row">
            <div class="col-md-12">
                  <div class="card-body">
                    <form method="post" class="form-horizontal js-ajax-form margin-top-20" role="form"
                          action="{:url('admin/mailer/templatePost')}">
                        <div class="form-group">
                            <label for="input-title" class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('EMAIL_SUBJECT')}</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" name="subject" id="input-title" value="{$subject|default=''}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-title" class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('EMAIL_TEMPLATE')}</label>
                            <div class="col-md-6 col-sm-12">
                                <script type="text/plain" id="content" name="template">{$template|default=""|htmlspecialchars_decode}</script>
                                <literal><span style="color: #ffb752;">请用{$code}代替数字验证码<!--，{$username}代替用户名--></span></literal>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <input type="hidden" name="template_key" value="verification_code">
                                <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
</div>
</div>
</block>
<block name="script">
<script src="__STATIC__/js/admin.js"></script>
<script type="text/javascript">
    //编辑器路径定义
    var editorURL = GV.WEB_ROOT;
</script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
    var editorcontent = new baidu.editor.ui.Editor();
    editorcontent.render('content');
</script>
</block>